package fileStorage

import (
	"gitee.com/longwangcloud/toolsdk/fileStorage/adapter"
)

const (
	StorageTypeOss = "oss"
	StorageTypeCos = "cos"
)

func Make(uploadChannel,conf interface{}) FileInterface {
	switch uploadChannel {
	case StorageTypeOss:
		return Adapter{FileInterface: &adapter.OssAdapter{OssConf:conf.(adapter.OssConf)}}
	case StorageTypeCos:
		return Adapter{FileInterface: &adapter.CosAdapter{CosConf: conf.(adapter.CosConf)}}
	}
	return nil
}
